import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
 
{
  path: "/tiyu",
  component: () => import("@/components/tiyu.vue")
},
{
  path: "/yule",
  // component: yule  原写法
  // 路由懒加载
  component: () => import("@/components/yule.vue")
},
{
  path: "/shenhuo",
  component: () => import("@/components/shenhuo.vue")
},
{
  path: "/fu",
  component: () => import("@/components/fu.vue"),
},

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
